package cn.iocoder.yudao.module.system.enums.product;

import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.List;

/**
 * 系统产品编码
 */
@Getter
@AllArgsConstructor
public enum ProductEnum {

    // 完成
    SIMPLE_CALL("simple-call", "点呼话费套餐"),

    // 完成
    CORP_SIMPLE_CALL("corp-simple-call", "企业点呼话费"),


    // 群呼话费
    BATCH_CALL("batch-call", "群呼话费套餐"),

    // 双向回拨
    DOUBLE_CALL("double-call", "双向回拨话费套餐"),

    // 完成
    SYSTEM_ACCOUNT("system-account", "系统员工账号"),

    // 创建 / 删除 ok
    CALL_AGENT("call-agent", "外呼坐席账号"),

    // 获取 / 修改（订单回调）
    RECEIVE_LIMIT("receive-limit", "企业领取上限"),


    // TODO 机器人api的查询和更新
    ROBOT_CALL("robot-call", "机器人话费套餐"),

    ROBOT_NUM("robot-num", "机器人坐席套餐"),

    // 创建 / 删除 ok
    SERVICE_ACCOUNT("service-account", "在线客服账号"),

    // TODO 广告模块的创建/删除
    AD_ACCOUNT("ad-account", "广告平台账号"),

    // 充值、扣款
    WALLET("wallet", "钱包充值"),


    BOX("box", "无线话机盒子"),

    IVR_NUM("ivr-num", "ivr并发控制"),
    ;

    /**
     * 编码
     */
    private final String code;

    /**
     * 名称
     */
    private final String name;

    public static Boolean isCallType(String code) {
        return ObjectUtil.equals(code, DOUBLE_CALL.getCode()) || ObjectUtil.equals(code, SIMPLE_CALL.getCode()) || ObjectUtil.equals(code, BATCH_CALL.getCode()) || ObjectUtil.equals(code, ROBOT_CALL.getCode()) || ObjectUtil.equals(code, IVR_NUM.getCode());
    }



}
